<?foreach ($groups as $key => $group) :?>
    <h1>Teebox <?echo $key?></h1>
    <table>
        <thead>
            <th width="15%"> </th>
            <th>Name</th>
            <th width="20%">H'Cap</th>
        </thead>

        <tbody>
        <?foreach ($group as $user) :?>
            <tr>
                <td><img src="" alt="avatar"/></td>
                <td><?echo $user->name?></td>
                <td><?echo $user->hcap?></td>
            </tr>
        <?  endforeach;?>
        </tbody>
    </table>
<?endforeach?>